<?php include('pages/header.php') ?>

<?php
require_once('defs.php');

if (move_uploaded_file ($_FILES['userfile']['tmp_name'], "/tmp/{$_FILES['userfile'] ['name']}")) {
    echo "<pre>";
    echo exec("cat /tmp/{$_FILES['userfile'] ['name']} | sqlite3 ".DBASEFILE);
    echo "</pre>";
    echo "Восстановлено.";
} else {
    echo "Ошибка восстановления базы данных.";
}

?>

<?php include('pages/footer.php'); ?>
